from api.ihrm_login_api import LoginApi


class GetToken:

    # 封装获取token工具
    @classmethod
    def get_token(cls):
        body = {"mobile": "13800000002", "password": "123456"}
        resp = LoginApi.login(body)
        token = resp.json().get('data')
        # print(token)
        return token


if __name__ == '__main__':
    GetToken.get_token()
